package cn.me.alphamq.client.consumer;

import cn.me.alphamq.common.enumeration.ConsumeStatusEnum;

/**
 * 消费的结果
 *
 * @author f
 */
public class ConsumeResult {

    /**
     * 消费成功的对象
     */
    public static final ConsumeResult CONSUME_SUCCESS = new ConsumeResult(ConsumeStatusEnum.CONSUME_SUCCESS.getCode());

    /**
     * 之后再次消费的对象，在消费失败时使用
     */
    public static final ConsumeResult CONSUME_LATER = new ConsumeResult(ConsumeStatusEnum.CONSUME_LATER.getCode());

    /**
     * 消费的状态
     *
     * @see ConsumeStatusEnum
     */
    private int consumeStatus;

    public ConsumeResult(int consumeStatus) {
        this.consumeStatus = consumeStatus;
    }

    public int getConsumeStatus() {
        return consumeStatus;
    }

    public void setConsumeStatus(int consumeStatus) {
        this.consumeStatus = consumeStatus;
    }
}
